#include "ThreadPool.hpp"
#include "Task.hpp"
#include <memory>
#include<unistd.h>
using namespace std;
int main()
{

    ThreadPool<Task>::GetInstance()->run();
    int x, y;
    char op;
    while (1)
    {

        cout << "请输入数字1" << endl;
        cin >> x;
        cout << "请输入数字2" << endl;
        cin >> y;
        cout << "请输入操作符" << endl;
        cin >> op;
        Task t(x, y, op,MyMath);
        ThreadPool<Task>::GetInstance()->push(t);
        sleep(1);
    }
}